//
//  ShenPiXiangQingBiaoTouTableViewCell.m
//  JuBoCRM
//
//  Created by iMac on 2024/4/2.
//  Copyright © 2024 iningKe. All rights reserved.
//

#import "ShenPiXiangQingBiaoTouTableViewCell.h"

@implementation ShenPiXiangQingBiaoTouTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setDataDictionary:(NSDictionary *)dataDictionary{
    _dataDictionary = dataDictionary;
    NSDictionary *dataDic = dataDictionary;
    
    
    _titleLabel.text = GetHandleString(dataDic, @"categoryTitle");
    
    if([GetHandleString(dataDic, @"examineStatus") integerValue] == 0){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"待审核";
        self.statusView1.backgroundColor = rgba(255, 248, 235, 1);
        self.statusView2.backgroundColor = rgba(196, 142, 34, 1);
        self.statusLabel.textColor = rgba(196, 142, 34, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 1){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"通过";
        self.statusView1.backgroundColor = rgba(232, 255, 239, 1);
        self.statusView2.backgroundColor = rgba(51, 196, 34, 1);
        self.statusLabel.textColor = rgba(51, 196, 34, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 2){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"拒绝";
        self.statusView1.backgroundColor = rgba(255, 233, 233, 1);
        self.statusView2.backgroundColor = rgba(255, 0, 0, 1);
        self.statusLabel.textColor = rgba(255, 0, 0, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 3){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"审核中";
        self.statusView1.backgroundColor = rgba(255, 244, 232, 1);
        self.statusView2.backgroundColor = rgba(255, 137, 0, 1);
        self.statusLabel.textColor = rgba(255, 137, 0, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 4){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"撤回";
        self.statusView1.backgroundColor = rgba(223, 223, 223, 1);
        self.statusView2.backgroundColor = rgba(90, 98, 112, 1);
        self.statusLabel.textColor = rgba(90, 98, 112, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 5){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"未提交";
        self.statusView1.backgroundColor = rgba(242, 241, 241, 1);
        self.statusView2.backgroundColor = rgba(184, 184, 184, 1);
        self.statusLabel.textColor = rgba(184, 184, 184, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 6){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"创建";
        self.statusView1.backgroundColor = rgba(242, 247, 255, 1);
        self.statusView2.backgroundColor = rgba(40, 120, 255, 1);
        self.statusLabel.textColor = rgba(40, 120, 255, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 7){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"删除";
        self.statusView1.backgroundColor = rgba(242, 241, 241, 1);
        self.statusView2.backgroundColor = rgba(184, 184, 184, 1);
        self.statusLabel.textColor = rgba(184, 184, 184, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 8){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"作废";
        self.statusView1.backgroundColor = rgba(242, 241, 241, 1);
        self.statusView2.backgroundColor = rgba(184, 184, 184, 1);
        self.statusLabel.textColor = rgba(184, 184, 184, 1);
    }else  if([GetHandleString(dataDic, @"examineStatus") integerValue] == 10){
        //        0待审核、1通过、2拒绝、3审核中 4:撤回 5 未提交 6 创建 7 已删除 8 作废 10 忽略 即未启用审批流
        self.statusLabel.text = @"忽略";
        self.statusView1.backgroundColor = rgba(242, 241, 241, 1);
        self.statusView2.backgroundColor = rgba(184, 184, 184, 1);
        self.statusLabel.textColor = rgba(184, 184, 184, 1);
    }
    
}

@end
